package com.secsbrain.deploy.client.model;

import java.io.Serializable;

/**
 * 发布相关参数
 *
 * @author zhaoyi
 */
public class DeployParam implements Serializable{

	private static final long serialVersionUID = 4080242530761056866L;

	private Long appId;//应用ID

	private String envName;//环境名称
	
	//根据应用类型选填
	private String targetPath;//目标路径，如/engine-service/target/engine-service.jar
	
	private String remoteFloder;//接收文件的远程文件夹，如/opt/jar/engine
	
	private String remoteCmdPath;//远程启动命令路径，如/opt/sh/engine/deploy.sh
	
	private String buildCmd;//如build:sit
	
	private Boolean switchflow=false;//是否切流发布
	
	private String switchEnvName;//切流发布环境名称
	
	private Boolean k8s=false;//是否支持k8s
	
	private Boolean k8sFlag=false;
	
	//spring boot选填参数
	private String registCenterUrl;//注册中心地址，如http://10.0.11.79:8762
	
	private Integer port;//端口号，如8080
	
	private String applicationName;//spring应用名，如service-engine
	
	private Integer waitTime;//下线后等待时间（秒）
	
	private String jvmOps;

	private String javaOps;
	
	public DeployParam() {
		super();
	}
	
	public DeployParam(Long appId) {
		super();
		this.appId = appId;
	}
	
	/**
	 * DOTNET切流
	 * @param switchEnvName
	 */
	public DeployParam(Long appId,String switchEnvName) {
		super();
		this.appId = appId;
		this.switchflow = true;
		this.switchEnvName = switchEnvName;
	}

	/**
	 * LinuxNec
	 * 
	 * @param appId
	 * @param targetPath
	 * @param remoteFloder
	 * @param remoteCmdPath
	 */
	public DeployParam(Long appId, String targetPath, String remoteFloder, String remoteCmdPath) {
		super();
		this.appId = appId;
		this.targetPath = targetPath;
		this.remoteFloder = remoteFloder;
		this.remoteCmdPath = remoteCmdPath;
	}


	/**
	 * StaticNec
	 * 
	 * @param appId
	 * @param remoteFloder
	 * @param buildCmd
	 */
	public DeployParam(Long appId, String remoteFloder, String buildCmd) {
		super();
		this.appId = appId;
		this.remoteFloder = remoteFloder;
		this.buildCmd = buildCmd;
	}

	public Long getAppId() {
		return appId;
	}

	public void setAppId(Long appId) {
		this.appId = appId;
	}

	public String getTargetPath() {
		return targetPath;
	}

	public void setTargetPath(String targetPath) {
		this.targetPath = targetPath;
	}

	public String getRemoteFloder() {
		return remoteFloder;
	}

	public void setRemoteFloder(String remoteFloder) {
		this.remoteFloder = remoteFloder;
	}

	public String getRemoteCmdPath() {
		return remoteCmdPath;
	}

	public void setRemoteCmdPath(String remoteCmdPath) {
		this.remoteCmdPath = remoteCmdPath;
	}

	public String getBuildCmd() {
		return buildCmd;
	}

	public void setBuildCmd(String buildCmd) {
		this.buildCmd = buildCmd;
	}

	public Boolean isSwitchflow() {
		return switchflow;
	}

	public void setSwitchflow(Boolean switchflow) {
		this.switchflow = switchflow;
	}

	public String getSwitchEnvName() {
		return switchEnvName;
	}

	public void setSwitchEnvName(String switchEnvName) {
		this.switchEnvName = switchEnvName;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getApplicationName() {
		return applicationName;
	}

	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}

	public Integer getWaitTime() {
		return waitTime;
	}

	public void setWaitTime(Integer waitTime) {
		this.waitTime = waitTime;
	}

	public String getRegistCenterUrl() {
		return registCenterUrl;
	}

	public void setRegistCenterUrl(String registCenterUrl) {
		this.registCenterUrl = registCenterUrl;
	}

	public String getJvmOps() {
		return jvmOps;
	}

	public void setJvmOps(String jvmOps) {
		this.jvmOps = jvmOps;
	}

	public String getJavaOps() {
		return javaOps;
	}

	public void setJavaOps(String javaOps) {
		this.javaOps = javaOps;
	}

	public String getEnvName() {
		return envName;
	}

	public void setEnvName(String envName) {
		this.envName = envName;
	}

	public Boolean isK8s() {
		return k8s;
	}

	public void setK8s(Boolean k8s) {
		this.k8s = k8s;
	}

	public Boolean isK8sFlag() {
		return k8sFlag;
	}

	public void setK8sFlag(Boolean k8sFlag) {
		this.k8sFlag = k8sFlag;
	}
	
}
